import {
  createStore
} from "vuex";
import getters from './getters'
import mutations from './mutations'
import actions from './actions'
import moduleHistory from './modules/history'
var ua = window.navigator.userAgent;
export default createStore({
  state: {
    isAndroid: ua.indexOf("Android") > -1 || ua.indexOf("Adr") > -1,
    isiOS: !!ua.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
    common: {},
    api: {},
    isAnchor: null,
    isShow: false, //弹窗
    showType: null,
    isTips: false,
    tips: '',
    cur: -1, //赛段定位
    firstComing: true,
    userInfo:{},
    anchorInfo:{}
  },
  getters,
  mutations,
  actions,
  modules: {
    moduleHistory
  },
});